package com.cxl.autocode.data;

/**
 * 接口和实现在一个包下面
 */
public class SmmFrameWork extends Path {
	
	public SmmFrameWork(String beanClassPath) {
		super(beanClassPath);
		
	}

	
	/**
	 * 接口和实现在一个包下面
	 */

	@Override
	public void transformPath() {
		String pathArray[]=getBeanClassPath().split("\\.");
		int arraySize=pathArray.length;
		setBeanName(pathArray[arraySize-1]);
		setDaoName(pathArray[arraySize-1]+"Dao");
		setDaoImplName(pathArray[arraySize-1]+"DaoImpl");
		setServiceName(pathArray[arraySize-1]+"Service");
		setServiceImplName(pathArray[arraySize-1]+"ServiceImpl");
		setActionName(pathArray[arraySize-1]+"Action");
		String path="";
		for(int i=0;i<arraySize;i++)
		{
			 path+=pathArray[i]+".";
			if(i==arraySize-3)
			{
				setDaoPackage(path+"dao");
				setServicePackage(path+"service");
				setActionPackage(path+"action");
				setServiceImplPackage(path+"service");
				setDaoImplPackage(path+"dao");
			}
		}
	}
	
	
	
	public static void main(String[] args) {
		SmmFrameWork path=new SmmFrameWork("com.cxl.bean.Goods");
	}

}
